﻿@using DirectSell.Model.User
@using Webdiyer.WebControls.Mvc;
@model PagedList<UserUpgrade>

<table class="table table-border table-bordered table-hover table-bg table-sort">
    <thead>
        <tr class="text-c">
            <th width="80">序号</th>
            <th width="100">会员编号</th>
            <th width="100">原级别</th>
            <th width="40">升级后级别</th>
            <th width="90">金额</th>
            <th width="150">申请时间</th>
            <th width="70">状态</th>
            <th width="100">操作</th>
        </tr>
    </thead>
    <tbody>
        @{ int i = 0;}
        @foreach (var item in Model)
        {
            <tr class="text-c">
                <td>@(Model.StartItemIndex + i++)</td>
                <td><u style="cursor:pointer" class="text-primary" onclick="member_show('@item.UserCode', '/Manager/MemberList/MemberInfo?usercode=@item.UserCode', '10001', '360', '400')">@item.UserCode</u></td>
               @switch (item.NowLevel)
               {
                   case 1:<td>一级会员</td>;break;
                   case 2:<td>二级会员</td>; break;
                   case 3:<td>三级会员</td>; break;
               }
                @switch (item.AfterLevel)
                {
                    case 1:
                <td>一级会员</td>; break;
                    case 2:
                <td>二级会员</td>; break;
                    case 3:
                <td>三级会员</td>; break;
                }
                <td>@item.Amount</td>
                <td>@item.UpgradeDate</td>
                @switch (item.UpgradeState)
                {
                 case 0:
                <td class="td-status"><span class="label label-purple radius">待审核</span></td>
                break;
                case 1:
                <td class="td-status"><span class="label label-success radius">已审核</span></td>
                break;
                 case 2:
                 <td class="td-status"><span class="label label-danger radius">已拒绝</span></td>
                 break;
                }
                <td class="td-manage">
                 @if (item.UpgradeState == 0)
                {
                <a style="text-decoration:none" onClick="Agree('@item.Id','@item.AfterLevel',1,'@item.UserCode')" title="确认升级"> <i class="Hui-iconfont">&#xe63f;</i></a>
                <a style="text-decoration:none" class="ml-5" onClick="Refuse('@item.Id','@item.AfterLevel',2,'@item.UserCode')" href="javascript:;" title="拒绝"> <i class="Hui-iconfont">&#xe631;</i></a>
                 }
                 else
                 {
                  <span>|</span>
                 }
            </tr>
        }
    </tbody>
</table>

